// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';
// 获取所有物料名称
export const getAllMaterialName = () => {
  return postRequest('/materialName/getAll')
}
// 分页获取物料清单
export const getMaterialList = (params) => {
  return postRequest('/materials/getAllList', params)
}

export const getMaterialNameById = (id) => {
  return postRequest('/materialName/getMaterialNameById', id)
}

export const checkMaterialCode = (code) => {
  return postRequest('/materials/checkCode', code)
}

export const insertMaterial = (params) => {
  return postRequest('/materials/insert', params)
}

export const editMaterial = (params) => {
  return postRequest('/materials/update', params)
}

export const getMaterialNameList = (params) => {
  return postRequest('/materialName/getAllList', params)
}

export const getMaterialTypeList = () => {
  return postRequest('/materialType/getAll')
}

export const editMaterialName = (params) => {
  return postRequest('/materialName/update', params)
}

export const insertProjectMaterial = params => {
  return postRequest('/projectMaterial/insert', params)
}

export const insertProjectMaterialDefine = params => {
  return postRequest('/projectMaterialDefine/insert', params)
}

export const insertMaterialName = params => {
  return postRequest('/materialName/insert', params)
}
